/* eslint-disable @typescript-eslint/no-explicit-any */
import request from "../utils/request";


/* 获取天气信息 */
export const getWeather = async (query: any) => {
	return await request({
		url: "/weather",
		method: "get",
		params: query,
	});
};

/* 获取网易云音乐 */
export const getMusic = async (typeName:string | null,query: any) => {
	return await request({
		url: `/wyMusic/${typeName}`,
		method: "get",
		params: query,
	});
};
/* 随机一句情话 */
export const getLoveText = async (query: any) => {
	return await request({
		url: `/text/love`,
		method: "get",
		params: query,
	});
};

/* 随机一句笑话 */
export const getJokeText = async (query: any) => {
	return await request({
		url: `/text/joke`,
		method: "get",
		params: query,
	});
};

/* 摸鱼日历 */
export const getMoyu = async (query: any) => {
	return await request({
		url: `/moyu`,
		method: "get",
		params: query,
	});
};

/* 风景图片 */
export const getWallpaper = async (query: any) => {
	return await request({
		url: `/wallpaper/views`,
		method: "get",
		params: query,
	});
};

/* 星座运势 */
export const getHoroscope = async (query: any) => {
	return await request({
		url: `/horoscope`,
		method: "get",
		params: query,
	});
};

/* 抖音热搜 */
export const getDouyinHot = async () => {
	return await request({
		url: `/hotlist/douyinHot`,
		method: "get",
	});
};

/* 微博热搜 */
export const getWbHot = async () => {
	return await request({
		url: `/hotlist/wbHot`,
		method: "get",
	});
};

/* 头条热搜 */
export const getToutiao = async () => {
	return await request({
		url: `/hotlist/toutiao`,
		method: "get",
	});
};

/* 知乎热搜 */
export const getZhihuHot = async () => {
	return await request({
		url: `/hotlist/zhihuHot`,
		method: "get",
	});
};

/* 百度热搜 */
export const getBaiduRD = async () => {
	return await request({
		url: `/hotlist/baiduRD`,
		method: "get",
	});
};

/* b站热搜 */
export const getBili = async () => {
	return await request({
		url: `/hotlist/bili`,
		method: "get",
	});
};

/* 访客信息 */
export const getVisitorInfo = async () => {
	return await request({
		url: `/visitor.info`,
		method: "get",
	});
};

/* 二维码生成 */
export const getQrUrl = async (query:any) => {
	return await request({
		url: `/qr`,
		method: "get",
    params: query,
	});
};
